package com.cash.app.ui.main

import android.os.Bundle
import android.view.View
import com.cash.app.R
import com.cash.app.base.BaseActivity
import com.cash.app.custom.AppActionBar
import com.cash.app.databinding.AcTestBinding
import com.cash.app.utils.StatusBarUtil
import com.cash.app.utils.TLog
import com.cash.app.utils.pxToDp

class TestActivity : BaseActivity() {

    private lateinit var binding: AcTestBinding // private val viewModel: MainViewModel by viewModels()

    override fun setViewBind() {
        binding = AcTestBinding.inflate(layoutInflater)
    }

    override fun getLayoutView(): View {
        return binding.root
    }

    override fun getAppActionBar(): AppActionBar? {
        return binding.testActionBar
    }

    override fun setAppActionBar(actionBar: AppActionBar) {
        super.setAppActionBar(actionBar)
        actionBar.setTitleColor(resources.getColor(R.color.main_tab_text_normal))
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)

        val h = StatusBarUtil.getStatusBarHeight(this).pxToDp()
        TLog.d("getStatusBarHeight dp=$h")

        //enableEdgeToEdge()

        //        ViewCompat.setOnApplyWindowInsetsListener(binding.root) { v, insets ->
        //            val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
        //            v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
        //            insets
        //        }
    }
}